SUMMARY = "Realtek rtl8188fu Driver"
DESCRIPTION = "Realtek rtl8188fu Driver"
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

PV = "1.0-git"
SRCREV = "cb820af4dd0f7d9cf9805d8e9f770b06cefbed35"
SRC_URI = "git://gitee.com/leemeiyung/rtl8188fu.git"

S = "${WORKDIR}/git"

DEPENDS = "virtual/kernel"

inherit module

EXTRA_OEMAKE  = "ARCH=${ARCH}"
EXTRA_OEMAKE += "KSRC=${STAGING_KERNEL_BUILDDIR}"
EXTRA_OEMAKE += "USER_EXTRA_CFLAGS='-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DCONFIG_LITTLE_ENDIAN'"
# EXTRA_OEMAKE += "USER_EXTRA_CFLAGS='-DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -DCONFIG_LITTLE_ENDIAN -DCONFIG_DEBUG'"

do_install () {
    install -d ${D}/lib/modules/${KERNEL_VERSION}/extra
    install -m 0755 ${B}/rtl8188fu.ko ${D}/lib/modules/${KERNEL_VERSION}/extra/rtl8188fu.ko
	
	install -d ${D}/lib/firmware/rtlwifi
	install -m 0644 ${B}/firmware/rtl8188fufw.bin ${D}/lib/firmware/rtlwifi/rtl8188fufw.bin
}

RPROVIDES_${PN} += "kernel-module-rtl8188fu"

FILES_${PN} = " \
        /lib/firmware/rtlwifi/rtl8188fufw.bin \
"